package com.zl.csMall.mine.order.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.zl.csMall.mine.recAddress.po.RecAddress;
import com.zl.csMall.mine.user.po.User;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * @description: 订单
 * @author: ChenNing
 * @date 2025-10-22 10:02
 */
@Data
@ApiModel(description = "订单 实体")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;

    private long id;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "用户")
    @TableField(exist = false)
    private Map<String, Object> user;

    @ApiModelProperty(value = "商品ID", required = true)
    @NotNull(message = "不能为空！")
    private Long commodityId;

    @ApiModelProperty(value = "商品", required = true)
    @TableField(exist = false)
    private Map<String, Object> commodity;

    @ApiModelProperty(value = "收货地址ID", required = true)
    @NotNull(message = "不能为空！")
    private Long recAddressId;

    @ApiModelProperty(value = "收货地址")
    @TableField(exist = false)
    private RecAddress recAddress;

    @ApiModelProperty(value = "状态（1：待付款、2：待发货、3：待收货、4：已收货）")
    private Integer status;

    @ApiModelProperty(value = "付款时间")
    private Date paymentDate;

    @ApiModelProperty(value = "发货时间")
    private Date shipmentDate;

    @ApiModelProperty(value = "收货时间")
    private Date receivedDate;

    private String remark;

    private Date createDate;

}
